/**
*      author: Y_Yao
*      created: 2024-12-21 19:36:39
**/

#include<bits/stdc++.h>

#define int LL
using namespace std;
using LL = long long;
const LL LLINF = 1e18;
const int INF = 0x3f3f3f3f;
const int N = 2e5 + 7;
int n;

long double dis(int x1,int y1,int x2,int y2)
{
    return sqrtl((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1- y2));
}

void solve()
{
    cin >> n;
    int curx = 0,cury = 0;
    long double ans = 0;
    for(int i = 1;i <= n;i++)
    {
        int x,y;
        cin >> x >> y;
        ans += dis(curx,cury,x,y);
        curx = x;
        cury = y;
    }
    ans += dis(curx,cury,0,0);
    printf("%.20Lf",ans);
}

signed main()
{
    // ios::sync_with_stdio(false);
    // cin.tie(0);

    int t = 1;
    //cin >> t;
    while(t--)
    {
        solve();
    }
    return 0;
}